using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;

namespace ThridGroup.ERP.DTO.OrderManagement
{
    /// <summary>
    /// 销售订单DTO
    /// </summary>
    public class SalesOrderDto : EntityDto<int>
    {
        /// <summary>
        /// 订单编码
        /// </summary>
        public string DOrderCode { get; set; }

        /// <summary>
        /// 订单名称
        /// </summary>
        public string DOrderName { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        public string DCustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string DCustomerName { get; set; }

        /// <summary>
        /// 客户 PO 号
        /// </summary>
        public string DCustomerPONumber { get; set; }

        /// <summary>
        /// 订货日期
        /// </summary>
        public DateTime DOrderDate { get; set; }

        /// <summary>
        /// 交货日期
        /// </summary>
        public string DeliveryDate { get; set; }

        /// <summary>
        /// 币别
        /// </summary>
        public string DCurrency { get; set; }

        /// <summary>
        /// 结账方式
        /// </summary>
        public string DSettlementMethod { get; set; }

        /// <summary>
        /// 订单类别
        /// </summary>
        public string DOrderCategory { get; set; }

        /// <summary>
        /// 跟单
        /// </summary>
        public string DOrderFollower { get; set; }

        /// <summary>
        /// 业务员
        /// </summary>
        public string DSalesperson { get; set; }

        /// <summary>
        /// 质量要求
        /// </summary>
        public string DQualityRequirement { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string DRemarks { get; set; }

        /// <summary>
        /// 产品明细列表（不会保存到数据库，仅用于前端传递数据）
        /// </summary>
        public List<SalesOrderProductDto> Products { get; set; } = new List<SalesOrderProductDto>();
    }

    /// <summary>
    /// 创建或更新销售订单的DTO
    /// </summary>
    public class CreateUpdateSalesOrderDto
    {
        /// <summary>
        /// 订单编码
        /// </summary>
        public string DOrderCode { get; set; }

        /// <summary>
        /// 订单名称
        /// </summary>
        public string DOrderName { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        public string DCustomerCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string DCustomerName { get; set; }

        /// <summary>
        /// 客户 PO 号
        /// </summary>
        public string DCustomerPONumber { get; set; }

        /// <summary>
        /// 订货日期
        /// </summary>
        public DateTime DOrderDate { get; set; }

        /// <summary>
        /// 交货日期
        /// </summary>
        public string DeliveryDate { get; set; }

        /// <summary>
        /// 币别
        /// </summary>
        public string DCurrency { get; set; }

        /// <summary>
        /// 结账方式
        /// </summary>
        public string DSettlementMethod { get; set; }

        /// <summary>
        /// 订单类别
        /// </summary>
        public string DOrderCategory { get; set; }

        /// <summary>
        /// 跟单
        /// </summary>
        public string DOrderFollower { get; set; }

        /// <summary>
        /// 业务员
        /// </summary>
        public string DSalesperson { get; set; }

        /// <summary>
        /// 质量要求
        /// </summary>
        public string DQualityRequirement { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string DRemarks { get; set; }

        /// <summary>
        /// 产品明细列表（不会保存到数据库，仅用于前端传递数据）
        /// </summary>
        public List<SalesOrderProductDto> Products { get; set; } = new List<SalesOrderProductDto>();
    }

    /// <summary>
    /// 销售订单产品明细DTO
    /// </summary>
    public class SalesOrderProductDto
    {
        /// <summary>
        /// 产品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string Specification { get; set; }

        /// <summary>
        /// 材质
        /// </summary>
        public string Material { get; set; }

        /// <summary>
        /// 颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        /// 订货数量
        /// </summary>
        public decimal Quantity { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal Amount { get; set; }
    }
} 